﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string a = Request.HttpMethod;
            Response.Write("请求方式："+a);
            if (a == "GET")
            {
                string name = Request.QueryString["username"];
                string pswd = Request.QueryString["password"];
                Literal1.Text = "你好，" + name + "，你的密码是：" + pswd;
            }
            if (a == "POST")
            {
                string name = Request.Params["TextBox1"];
                string pswd = Request.Params["TextBox2"];
                Literal1.Text = "你好，" + name + "，你的密码是：" + pswd;
            }
        }
    }
}